package org.jeecg.modules.factor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.api.DTO.EmissionFactorQueryDTO;
import org.jeecg.modules.api.VO.EmissionFactorQueryVO;
import org.jeecg.modules.api.entity.CyEmissionFactorCollect;

import java.util.List;


/**
 * @Description: 碳排因子收藏表
 * @Author: jeecg-boot
 * @Date:   2024-11-11
 * @Version: V1.0
 */
public interface CyEmissionFactorCollectMapper extends BaseMapper<CyEmissionFactorCollect> {

    CyEmissionFactorCollect queryById(String id,String organizationId,String deptId);

    IPage<EmissionFactorQueryVO> queryPageList(Page<EmissionFactorQueryVO> page, EmissionFactorQueryDTO emissionFactorQueryDTO);

    //查询出当前组织下的所有收藏因子
    List<CyEmissionFactorCollect> selectCurrentOrganizationCollect(String organizationId, String deptId);

    //查询出是否收藏过指定因子
    CyEmissionFactorCollect selectCollectFactor(String emissionFactorId, String organizationId, String deptId);

    // 通过碳排因子id删除收藏记录
    void removeByEmissionFactorId(String emissionFactorId,String organizationId,String deptId);



}
